package com.example.qsindusty.jmm_spline.InfomationFragment;

import com.yixin.ystartlibrary.base.BasePresenter;
import com.yixin.ystartlibrary.base.IBaseView;

/**
 * Created by Administration on 2018/3/30.
 */

public class InfoPresenter extends BasePresenter implements InfoContarct.Presenter {
    InfoContarct.View mView ;

    @Override
    public void bindView(IBaseView view) {
                mView = (InfoContarct.View) view;
    }

    @Override
    public void unbindView() {
            dispose();
    }

    @Override
    public void getorderinfo(String token, String rows, String page) {
/*
        ApiManager.getInstence().getJmmApi().getSystemInfos(token,rows,page)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(new Observer<InfoData>() {
                    @Override
                    public void onSubscribe(Disposable d) {
                            mView.showLoading();
                    }

                    @Override
                    public void onNext(InfoData infoData) {
                        if (TextUtils.equals(infoData.getStatus(),"0"))
                        mView.getSuccessful(infoData);
                        else
                            mView.Frailer(infoData.getMessage());

                    }

                    @Override
                    public void onError(Throwable e) {
                        mView.closeLoading();
                        mView.Frailer(e.getMessage());
                    }

                    @Override
                    public void onComplete() {
                        mView.closeLoading();
                    }
                });
*/
    }
}
